package com.tg.data.http.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class NotifyConfigBean implements Parcelable {

    /**
     * id : 282
     * device_id : 690
     * user_id : 48
     * is_push : 1
     * detection_voice : 0
     * detection_image : 0
     * device_offline : 0
     * push_params : ["offline","motion","sound","body"]
     * append : null
     */

    private String id;
    private String device_id;
    private String user_id;
    private String is_push;
    private int detection_voice;
    private int detection_image;
    private int device_offline;

    protected NotifyConfigBean(Parcel in) {
        id = in.readString();
        device_id = in.readString();
        user_id = in.readString();
        is_push = in.readString();
        detection_voice = in.readInt();
        detection_image = in.readInt();
        device_offline = in.readInt();
        lowbattery = in.readInt();
        pir = in.readInt();
        device_emergency = in.readInt();
        push_interval = in.readInt();
        push_params = in.createStringArrayList();
        undisturbed = in.readParcelable(UndisturbedBean.class.getClassLoader());
    }

    public static final Creator<NotifyConfigBean> CREATOR = new Creator<NotifyConfigBean>() {
        @Override
        public NotifyConfigBean createFromParcel(Parcel in) {
            return new NotifyConfigBean(in);
        }

        @Override
        public NotifyConfigBean[] newArray(int size) {
            return new NotifyConfigBean[size];
        }
    };

    public UndisturbedBean getUndisurbed() {
        return undisturbed;
    }

    public void setUndisurbed(UndisturbedBean undisturbed) {
        this.undisturbed = undisturbed;
    }

    private UndisturbedBean undisturbed;

    public int getLowbattery() {
        return lowbattery;
    }

    public void setLowbattery(int lowbattery) {
        this.lowbattery = lowbattery;
    }

    private int lowbattery;

    public int getPir() {
        return pir;
    }

    public void setPir(int pir) {
        this.pir = pir;
    }

    private int pir;

    public int getDevice_emergency() {
        return device_emergency;
    }

    public void setDevice_emergency(int device_emergency) {
        this.device_emergency = device_emergency;
    }

    private int device_emergency;
    private Object append;
    private  int push_interval;
    private List<String> push_params;

    public int getPush_interval() {
        return push_interval;
    }

    public void setPush_interval(int push_interval) {
        this.push_interval = push_interval;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDevice_id() {
        return device_id;
    }

    public void setDevice_id(String device_id) {
        this.device_id = device_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getIs_push() {
        return is_push;
    }

    public void setIs_push(String is_push) {
        this.is_push = is_push;
    }

    public int getDetection_voice() {
        return detection_voice;
    }

    public void setDetection_voice(int detection_voice) {
        this.detection_voice = detection_voice;
    }

    public int getDetection_image() {
        return detection_image;
    }

    public void setDetection_image(int detection_image) {
        this.detection_image = detection_image;
    }

    public int getDevice_offline() {
        return device_offline;
    }

    public void setDevice_offline(int device_offline) {
        this.device_offline = device_offline;
    }

    public Object getAppend() {
        return append;
    }

    public void setAppend(Object append) {
        this.append = append;
    }

    public List<String> getPush_params() {
        return push_params;
    }

    public void setPush_params(List<String> push_params) {
        this.push_params = push_params;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(device_id);
        dest.writeString(user_id);
        dest.writeString(is_push);
        dest.writeInt(detection_voice);
        dest.writeInt(detection_image);
        dest.writeInt(device_offline);
        dest.writeInt(lowbattery);
        dest.writeInt(pir);
        dest.writeInt(device_emergency);
        dest.writeInt(push_interval);
        dest.writeStringList(push_params);
        dest.writeParcelable(undisturbed, flags);
    }
}
